package com.htjc.integral.redpacket.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;

import com.htjc.integral.model.redpacket.EcBpRedOrder;
import com.htjc.integral.model.redpacket.EcBpRedOrderExchange;

@Mapper
public interface EcBpRedOrderMapper {
	/**
	 *查询订单信息
	 *@param orderId
	 *@return EcBpRedOrder
	 */
	public EcBpRedOrder selectOrderInformationByID(String orderId);
	
	/**
	 * 插入订单记录
	 * @param redOrder
	 */
	public void insertEcBpRedOrder(EcBpRedOrder redOrder);
	
	/**
	 * 查询商城红包库存
	 * @param code
	 * @return
	 */
	public String loadStockNumberId(String code);
	
	public void updateRedOrderStatus(String orderId);
	
	public List<Map<String, Object>> loadRedPacPlatform(String platformId);
	
	public void insertEcBpRedOrderExchange(EcBpRedOrderExchange redOrderEx);
	
	/**
	 *查询EcBpRedOrderExchange表，看数据是否存在
	 *@param orderMap
	 *@return EcBpRedOrderExchange
	 */
	public EcBpRedOrderExchange selectExchangeByID(Map<String, Object> orderMap);
	
	public EcBpRedOrder selectByBpRedOrderId(String orderId);
	
	/**
	 *更新订单处于哪个接口失败的状态
	 */
	public void updateInterFaceStatus(Map<String, Object> interFaceStatus);
	
}